package com.asia5b.a5mall.middleware.model.promotion

import com.asia5b.a5bmall.resource.ResString
import com.asia5b.a5mall.middleware.R
import com.asia5b.a5mall.middleware.model.base.BaseModel
import java.io.Serializable

/**
 * Created by zhangyuncai on 2020/1/16.
 */
class CouponHallModel: BaseModel() {

    var coupon_id=0
    var seller_name=""

    //优惠要求额度
    var coupon_threshold_price=0.0
    //优惠额度
    var coupon_price=0.0

    var xmlTitle=""
    get() {
        return "${seller_name}${ResString.get(R.string.可以使用)}"
    }
    var xmlPrice=""
    get() {
        return String.format(ResString.get(R.string.满_数_减_数_元),coupon_threshold_price,coupon_price)
    }


}

/*
  {
  "coupon_id": 33,
  "title": "20",
  "coupon_price": 20,
  "coupon_price_list": null,
  "coupon_threshold_price": 200,
  "coupon_threshold_price_list": null,
  "start_time": 1579017600,
  "end_time": 1582991999,
  "create_num": 100,
  "limit_num": 0,
  "used_num": 1,
  "received_num": 2,
  "seller_id": 64,
  "seller_name": "全广州最靓的店",
  "country_id": 12
},
   */